package top.lingkang.finalsessionsolon.test02;

import org.noear.solon.annotation.Component;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.Filter;
import org.noear.solon.core.handle.FilterChain;

/**
 * @author lingkang
 * Created by 2024/5/9
 */
@Component
public class GlobalFilter implements Filter {
    public GlobalFilter() {
        System.out.println("GlobalFilter");
    }

    @Override
    public void doFilter(Context ctx, FilterChain chain) throws Throwable {
        try {
            chain.doFilter(ctx);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
